import cv2 as cv
filename = r'D:\photo\building.jpg'
img = cv.imread(filename)
fast = cv.FastFeatureDetector_create(threshold=40,nonmaxSuppression=True,type=cv.FAST_FEATURE_DETECTOR_TYPE_9_16)
kp = fast.detect(img,None)
cv.drawKeypoints(img,kp,img,color=(0,255,255))
cv.imshow('1',img)
cv.waitKey()